package top.zy.boot.async.service;

import org.springframework.scheduling.annotation.Async;

import java.util.concurrent.CompletableFuture;
import java.util.function.Supplier;

/**
 * @author ZackYoung
 * @version 1.0
 * @date 2021/12/18
 */

public interface AsyncService {
    <T> CompletableFuture<T> asyncResult(Supplier<T> supplier);

    @Async
    void asyncResult(Runnable runnable);
}
